widget: Consider opacity when drawing toplevels
authorTimm Bäder <mail@baedert.org>
Sat, 17 Jun 2017 12:13:29 +0000 (14:13 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:14 +0000 (21:27 -0400)
This used to work in gtk3 and is used e.g. in the inspector when using
wayland.

gtk/gtkwidget.c

index c605361d4dfe97a337db7d0e6362a093c4db6d31..e25255ed1ac6d9135af3e5a99eeab978c95cadcb 100644 (file)
@@ -15491,10 +15491,7 @@ gtk_widget_snapshot (GtkWidget   *widget,
   if (gtk_snapshot_clips_rect (snapshot, &offset_clip))
     return;
 
-  if (_gtk_widget_is_toplevel (widget))
-    opacity = 1.0;
-  else
-    opacity = widget->priv->alpha / 255.0;
+  opacity = widget->priv->alpha / 255.0;
   if (opacity <= 0.0)
     return;